#ifndef NANE_CONVERSION_H
#   define  NANE_CONVERSION_H

#	include "types.h"

namespace nane
{
    struct Conversion
    {
        template<typename T1, typename T2>
        static bool Convert( T1* _value, T2& _data )
        {
            *_value = static_cast<T1>(_data);
            return true;
        }

        template<typename T>
        static bool Convert( T* _value, T& _data )
        {
            *_value = _data;
            return true;
        }

    };

    template<>
    bool Conversion::Convert<int, const char*>( int* _value, const char*& _data );

    template<>
    bool Conversion::Convert<float, const char*>( float* _value, const char*& _data );

    template<>
    bool Conversion::Convert<bool, const char*>( bool* _value, const char*& _data );

    template<>
    bool Conversion::Convert<unsigned int, const char*>( unsigned int* _value, const char*& _data );

    template<>
    bool Conversion::Convert<bool, uint32>( bool* _value, uint32& _data );

    template<>
    bool Conversion::Convert<bool, int32>( bool* _value, int& _data );

    template<>
    bool Conversion::Convert<bool, float>( bool* _value, float& _data );
}   // namespace nane

#endif	// NANE_CONVERSION_H
